<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BatterySetting extends Model
{
    protected $table = 'xfy_battary_settings';
    protected $fillable = ['battery_id', 'level', 'lowest', 'switch_group'];

    const LEVEL_TEXT = ['1' => '一级', '2' => '二级', '3' => '三级'];

    public function batteris()
    {
        return $this->belongsTo(Battery::class, 'battery_id');
    } 
}